package com.szsfm.vehiclemanagement.bean;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Property;
import org.greenrobot.greendao.annotation.Transient;

/**
 * Created by zhoubigbo on 2017/11/27.
 */
@Entity
public class User {

    @Id(autoincrement = true)
    private long id;


    @Property(nameInDb = "username")
    private String username;

    @Property(nameInDb = "password")
    private String password;

    //后台生成
    @Transient
    private String userID;
    //后台生成
    @Transient
    private String loginTime;

    public String getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(String loginTime) {
        this.loginTime = loginTime;
    }

    public String getUserID() {
        return userID;
    }

    public void setUserID(String userID) {
        this.userID = userID;
    }

    private volatile static User instance;

    public static User shareInstance() {
        synchronized (User.class) {
            if (instance == null) {
                synchronized (User.class) {
                    instance = new User();
                }
            }
            return instance;
        }

    }

    @Generated(hash = 586692638)
    public User() {
    }



    @Generated(hash = 1081888880)
    public User(long id, String username, String password) {
        this.id = id;
        this.username = username;
        this.password = password;
    }

    public long getId() {
        return this.id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getUsername() {
        return this.username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return this.password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

}
